#include"ThreadPool.hpp"
#include<ctime>
#include<unistd.h>

int main()
{
    srand(time(nullptr));
    ThreadPool<int>* tp = new ThreadPool<int>();
    tp->Start();

    while(true)
    {
        int x = rand() % 10;
        tp->Push(x);
        std::cout<<"生产了一个数据："<<x<<std::endl;
        sleep(1);
    }
    return 0;
}